package cn.fan.feign.clients;

import cn.fan.feign.clients.fallback.FundClientFallbackFactory;
import cn.fan.feign.pojo.FundMain;
import cn.fan.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(value = "fundservice",fallbackFactory = FundClientFallbackFactory.class)
public interface FundClient {
    @GetMapping("/fundmains/getByCode/{code}")
    R getByCode(@PathVariable("code") String code);

    @GetMapping("/fundmains/select/{code}")
    FundMain selectByCode(@PathVariable("code") String code);

    @PostMapping("/fundmains/list")
    R list(@RequestBody FundMain fundMain);

    @PostMapping("/funddatas/list")
    R list(@RequestBody Map<String,Object> map);
}
